package com.ftg.learn.lesson6;

/**
 * 狗
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/6/28 下午3:38
 */
public class Dog extends Animal{


    @Override
    public void eat() {
        System.out.println("狗行千里吃屎");
    }

    public static void main(String[] args) {
        Dog d = new Dog();
        d.setName("小张");
        d.eat();

        Wolf w = new Wolf("小李");
        w.eat();

        Animal a = new Animal();
        a.eat();

        Animal a1 = new Wolf("小张");
        a1.eat();
    }

}
